//
//  TransactionDetaiCell.m
//  NewPro
//
//  Created by RYX on 2018/11/23.
//  Copyright © 2018年 何荧红. All rights reserved.
//

#import "TransactionDetailCell.h"
#import "TradeDetailModel.h"

@interface TransactionDetailCell ()
{
    
    __weak IBOutlet UILabel *timeLa;
    
    __weak IBOutlet UILabel *moneyLa;
    
    __weak IBOutlet UILabel *fenrunLa;
    
    __weak IBOutlet UILabel *typeLa;
    
}

@end

@implementation TransactionDetailCell

+ (instancetype)tempWithTableView:(UITableView *)tableView{
    
    TransactionDetailCell *cell = [tableView dequeueReusableCellWithIdentifier:@"CELL"];
    if (!cell) {
        
        cell = [self cell];
    }
    
    return cell;
}

+ (CGFloat)getHeight{
    
    UITableViewCell *cell = [self cell];
    return cell.frame.size.height;
}

+ (instancetype)cell{
    
    ClassName
    return [[[NSBundle mainBundle] loadNibNamed:className owner:self options:nil] objectAtIndex:0];
}

- (void)setModel:(TradeDetailModel *)model{

    timeLa.text = model.businessTime;
    moneyLa.text = [NSString stringWithFormat:@"%@元",model.tradeAmount];
    fenrunLa.text = [NSString stringWithFormat:@"%@元",model.dividedAmount];
    typeLa.text = model.tradeType;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
